<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="cz20941">DROP OPERATOR</title><body><p id="sql_command_desc">Removes an operator.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">DROP OPERATOR [IF EXISTS] <varname>name</varname> ( {<varname>lefttype</varname> | NONE} , 
    {<varname>righttype</varname> | NONE} ) [CASCADE | RESTRICT]</codeblock></section><section id="section3"><title>Description</title><p><codeph>DROP OPERATOR</codeph> drops an existing operator from the database
system. To run this command you must be the owner of the operator.</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt>IF EXISTS</pt><pd>Do not throw an error if the operator does not exist. A notice is
issued in this case. </pd></plentry><plentry><pt><varname>name</varname></pt><pd>The name (optionally schema-qualified) of an existing operator.</pd></plentry><plentry><pt><varname>lefttype</varname></pt><pd>The data type of the operator's left operand; write <codeph>NONE</codeph>
if the operator has no left operand. </pd></plentry><plentry><pt><varname>righttype</varname></pt><pd>The data type of the operator's right operand; write <codeph>NONE</codeph>
if the operator has no right operand.</pd></plentry><plentry><pt>CASCADE</pt><pd>Automatically drop objects that depend on the operator. </pd></plentry><plentry><pt>RESTRICT</pt><pd>Refuse to drop the operator if any objects depend on it. This is
the default. </pd></plentry></parml></section><section id="section5"><title>Examples</title><p>Remove the power operator <codeph>a^b</codeph> for type <codeph>integer</codeph>:</p><codeblock>DROP OPERATOR ^ (integer, integer);</codeblock><p>Remove the left unary bitwise complement operator <codeph>~b</codeph> for type
          <codeph>bit</codeph>:</p><codeblock>DROP OPERATOR ~ (none, bit);</codeblock><p>Remove the right unary factorial operator <codeph>x!</codeph> for type
        <codeph>bigint</codeph>:</p><codeblock>DROP OPERATOR ! (bigint, none);</codeblock></section><section id="section6"><title>Compatibility</title><p>There is no <codeph>DROP OPERATOR</codeph> statement in the SQL standard.
</p></section><section id="section7"><title>See Also</title><p><codeph><xref href="ALTER_OPERATOR.xml#topic1" type="topic" format="dita"/></codeph>,
            <codeph><xref href="CREATE_OPERATOR.xml#topic1" type="topic" format="dita"
        /></codeph></p></section></body></topic>
